how to fix invalid value for registry error